package com.architecture.core.web.actions;

import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 12-5-15
 * Time: 下午3:31
 * To change this template use File | Settings | File Templates.
 */
@Results({
        @Result(name = "front_login", location = "front/login.jsp"),
        @Result(name = "back_login", location = "back/login.jsp")
})
public class IndexAction extends AbstractAction {

    @Override
    @Action(value = "index")
    public String execute() throws Exception {
        return ActionSupport.SUCCESS;    //To change body of overridden methods use File | Settings | File Templates.
    }

    @Action(value = "to_user_login")
    public String toUserLogin() throws Exception {
        return "front_login";
    }

    @Action(value = "to_admin_login")
    public String toAdminLogin() throws Exception {
        return "back_login";
    }

    @Override
    public void validate() {

    }
}
